package io.zbc.grow.arithmetic.business.question;

import io.zbc.grow.arithmetic.util.RandomUtil;
import io.zbc.grow.arithmetic.vo.Binary;

/**
 * @author zbc
 * @date 2022/12/5
 */
public class Subtraction implements IQuestion {
    @Override
    public Binary generateQuestion(int maxValue) {
        int firstNumber = RandomUtil.getRandom(maxValue) + 1;
        int secondNumber = RandomUtil.getRandom(firstNumber);
        return new Binary(firstNumber, secondNumber, "-");
    }
}
